package webserviceclient;

/**
 *
 * @author root
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Main("KittensWithMachineguns.png");
    }

    public Main(String aTitle){

        try{
            System.out.println("Setting up service...");
            axisdownloadserver.DownloadServerWebService service = new axisdownloadserver.DownloadServerWebService();
            System.out.println("Setting up port...");
            axisdownloadserver.DownloadServerWebServicePortType port = service.getDownloadServerWebServiceHttpSoap11Endpoint();
            System.out.println("Querying Service");

            // TODO initialize WS operation arguments here
            // TODO process result here
            axisdownloadserver.xsd.ServerBandwidthBean result = port.requestServer(aTitle);
            System.out.println("Parsing result...");
            System.out.println("Best server found: "+result.getServerAddress());
            System.out.println("Bandwidth is: "+result.getServerBandWidth());
        } catch (Exception ex) {
            ex.printStackTrace();
        }

    }

}
